package com.spogher.components.dropdownChoices;

import java.util.Arrays;

import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.IChoiceRenderer;

import com.spogher.bsc.data.dataobjects.Player;
import com.spogher.bsc.data.dataobjects.Player.Position;

public class PlayerPositionDropDownChoice extends DropDownChoice<Player.Position>{

	private static final long serialVersionUID = 1L;

	public PlayerPositionDropDownChoice(String id) {
		super(id, Arrays.asList(Position.values()), new IChoiceRenderer<Player.Position>() {

			private static final long serialVersionUID = 1L;

			public Object getDisplayValue(Position object) {
				return object.toString();
			}

			public String getIdValue(Position object, int index) {
				return object.toString();
			}
		});
	}

}
